#include "service.h"
void start_core_server() {
    unsigned short port = std::stoi(configReader.getConfig(CONFIG_PORT, "7750"));
    std::string addr = configReader.getConfig(CONFIG_LISTEN,"0.0.0.0");
    std::cout << "Starting core service at " <<  addr << ":" << port << std::endl;
    try {
        create_service("0.0.0.0", port, core_accept_thread);
    }
    catch(const int err) {
        std::cout << "Core service start failed: " + std::string(strerror(err)) << std::endl;
        throw err;
    }
}